Page 98 - 2629_Devagiri_C-7
P. 98
LEARNING LOGS
A. Tick ( ) the correct option.
1. Select the type of flow of control where statements are executed one after another.
(i) Iterative flow (ii) Selective flow
(iii) Sequential flow (iv) Nested flow
2. Which keyword is used for decision-making in Python?
(i) for (ii) while
(iii) if (iv) print
3. The order in which program statements are executed is called .
(i) Compilation (ii) Flow of Control
(iii) Syntax (iv) Debugging
4. If the condition in an if statement is False, then .
(i) the if block is executed (ii) the program stops
(iii) the if block is skipped (iv) it gives an error
5. Mark the correct syntax of the ternary operator in Python.
(i) if <condition> else <value_if_true> <value_if_false>
(ii) <value_if_true> if (condition) else <value_if_false>
(iii) if <value_if_true> else <condition> <value_if_false>
(iv) <condition> if <value_if_true> else <value_if_false>
B. Fill in the blanks using the given hints:
1. When the condition in an if statement is False, the if block is .
Hints
2. The statement lets your program choose between two options. If…else…
skipped
3. Selective flow is also called making. nested
==
4. Placing one if statement inside another is called a if statement. decision
5. The symbol used to compare two values for equality is .
C. Write T for true and F for false.
1. The elif statement allows you to check multiple conditions in an if-else construct.
96
Premium Edition-VII

